import request from "@/util/request";

export default {
    // 1. 查询所有学生
    findStudents(){
        return request({
            url: '/student/list',
            method: 'get'
        })
    },
    // 2. 分页查询学生
    findByPage(page,pageSize) {
        return request({
            url: `/student/findByPage/${page}/${pageSize}`,
            method: 'get'
        })
    },
    // 3. 分页带条件查询
    search(page,pageSize,data){
        return request({
            url: `/student/search/${page}/${pageSize}`,
            data,
            method: 'post'
        })
    },
    // 4. 保存学生信息
    save(url,data,method){
        return request({
            url,
            data,
            method
        })
    },
    // 5. 删除学生信息
    delStudent(sids){
        return request({
            url: `/student/delete/${sids}`,
            method: 'delete'
        })
    }
}
